package edu.gdkm.collection;

import java.util.HashSet;
import java.util.Set;

public class SetDemo {
    public static void main(String[] args) {
        Set<Integer> set = new HashSet<Integer>();
        //剔除数组中重复的数
        int[] ii={12,31,23,235,45,74,64,24,32,84,15,23,32,3,31,9,89,14,8,8,9,5,3,12,32,31,35};
        for (int i = 0; i < ii.length; i++) {
            set.add(ii[i]);

        }
        System.out.println(set);

    }
}
